@extends('module::BlogThemeLightA.View.pc.frameCustom')

@section('pageTitle'){{$pageTitle?$pageTitle.' | '.modstart_config('siteName'):modstart_config('siteName')}}@endsection
@section('pageKeywords'){{$pageKeywords}}@endsection
@section('pageDescription'){{$pageDescription}}@endsection

@section('bodyContent')
    <div class="list-head">
        <div class="container">
            <div class="list-head-body">
                <h2>
                    <i></i>
                    @if($category)
                        {{$category['title']}}
                    @else
                        博客列表
                    @endif
                </h2>
                @if($keywords)
                    <p>
                        搜索
                        <span style="color:red;">{{$keywords}}</span>
                        共找到
                        <span style="color:red;">{{$total}}</span>
                        条记录
                        <a href="?{{\ModStart\Core\Input\Request::mergeQueries(['keywords'=>null])}}"
                           class="btn btn-sm btn-danger"
                        >
                            x
                        </a>
                    </p>
                @endif
            </div>
        </div>
    </div>
    <div class="list-ordinary">
        <div class="container-xxl">
            <div class="row">
                <div class="col-lg-8">
                    <div class="list-ordinary-wrap">
                        @include('module::BlogThemeLightA.View.pc.inc.blogItems',['records'=>$records])
                        <div>
                            <nav>
                                {!! \ModStart\Core\Util\PageHtmlUtil::render($total, $pageSize, $page,
                                        '?' . \ModStart\Core\Input\Request::mergeQueries(['page' => ['{page}']]), [
                                    'warp' => '<ul class="pagination justify-content-center">%s%</ul>',
                                    'more' => '<li class="page-item"><a class="page-link" href="javascript:;">...</a></li>',
                                    'prev' => '<li class="page-item"><a class="page-link" href="%s%">上一页</a></li>',
                                    'prevDisabled' => '<li class="page-item disabled"><span class="page-link">上一页</span></li>',
                                    'next' => '<li class="page-item"><a class="page-link" href="%s%">下一页</a></li>',
                                    'nextDisabled' => '<li class="page-item disabled"><span class="page-link">下一页</span></li>',
                                    'current' => '<li class="page-item"><a class="page-link" href="javascript:;">%p%</a></li>',
                                    'item' => '<li class="page-item"><a class="page-link" href="%s%">%p%</a></li>',
                                ]) !!}
                            </nav>
                        </div>
                    </div>
                </div>
                @include('module::BlogThemeLightA.View.pc.inc.pageRightPanel')
            </div>
        </div>
    </div>

@endsection
